
#pragma once

#include "CxType.h"
#include <boost/signals2.hpp>
#include "CxThread.h"
#include "CxLinerBuffer.h"


class CxDBThread		: public	CxThread
{

	typedef DataRevPart::CxLinerBuffer			_Buffer;
	typedef boost::mutex						_Mutex;
	typedef boost::condition_variable_any		_Cond;
	typedef boost::signals2::signal<void(bool)>	_Signal;
	typedef boost::function<void(bool)>			_ConnectFunc;

public:

	CxDBThread(size_t number,_ConnectFunc );
	~CxDBThread();

public:
	void		Start(){CX_NO_IMP;}
	void		Close(){CX_NO_IMP;}
	UINT		GetState()const{return m_state;}

protected:

	void		RunFunc();
	_Signal		sig_connect;

public:
	//»ñÈ¡»º³åÇø
	_Buffer		&GetBuffer(){return m_buffer;}

private:
	bool				m_spin;
	size_t				m_number;
	_Buffer				m_buffer;
};
